// 连接数据库服务
const mongoose = require("mongoose");

mongoose
    .connect("mongodb://localhost:27017/myBlog", {
        useNewUrlParser: true,
        useUnifiedTopology: true,
    })
    .then((_) => console.log("mongodb is ok"))
    .catch((err) => console.log(err, "error"));
